package cn.wgx.module.mind.util.aspose;


import java.io.InputStream;

/**
 * @author wgx
 * @description license 认证
 */
public class LicenseVerify {


    /**
     * @return Boolean
     * @descrition words包认证
     */
    public static boolean getWordsLicense() {
        boolean result = false;
        try {
            InputStream inputStream = LicenseVerify.class.getClassLoader().getResourceAsStream("license.xml");// license路径
            com.aspose.words.License aposeLicWords = new com.aspose.words.License();
            aposeLicWords.setLicense(inputStream);
            result = true;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return result;
    }

    /**
     * @return Boolean
     * @descrition cells包认证
     */
//    public static boolean getCellsLicense() {
//        boolean result = false;
//        try {
//           // InputStream inputStream = LicenseVerify.class.getClassLoader().getResourceAsStream("license.xml");// license路径
//            com.aspose.cells.License aposeLicCells = new com.aspose.cells.License();
//            aposeLicCells.setLicense(inputStream);
//            result = true;
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//        return result;
//    }

    /**
     * @return Boolean
     * @descrition slides包认证
     */
//    public static boolean getSlidesLicense() {
//        boolean result = false;
//        try {
//           // InputStream inputStream = LicenseVerify.class.getClassLoader().getResourceAsStream("license.xml");// license路径
//            com.aspose.slides.License aposeLicSlides = new com.aspose.slides.License();
//            aposeLicSlides.setLicense(inputStream);
//            result = true;
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//        return result;
//    }

}
